<?php $this->_extends('_layouts/main_layout'); ?>
<?php $this->_block('title'); ?>
	Add Pixel
<?php $this->_endblock(); ?>

<?php $this->_block('contents'); ?>
<div id="content" class="box">
	<h1>Add Pixel</h1>
		<?php 
			if(isset($infos)):
				foreach($infos as $info): ?>
					<p class="msg info"><?php echo $info;?></p>
		<?php	endforeach;
			endif; ?>
            
		<fieldset>
			<legend>Add Pixel</legend>
            <form method="POST" action="<?php echo url('pixelManager/insert');?>">
                <table class="nostyle">
                    <tr>
                        <td>Campaign:</td>
                        <td>
                            <input type="text" id="campaign" name="campaign" />
                        </td>
                    </tr>
                    <tr>
                        <td>Publisher:</td>
                        <td>
                            <input type="text" id="pub" name="pub" />
                        </td>
                    </tr>
                    <tr>
                        <td>Placement:</td>
                        <td>
                            <input type="text" id="pla" name="pla" />
                        </td>
                    </tr>
                    <tr>
                        <td>Controlled CR:</td>
                        <td><input type="text" id="peak" name="peak" />%</td>
                    </tr>
                    <tr>
                        <td colspan="2" class="t-right">
                        	<label id="addPixellabel" style="color:red;"></label>
                        	<input type="submit" class="input-submit" value="Save" id="save" />
                        </td>
                    </tr>
                </table>
            </form>
		</fieldset>
</div>
<script type="text/javascript">
	$("#save").click(function(){
		var peak=$("#peak").val();
		if((!isNaN(peak)) && peak<=100 && peak!=""){
			return true;	
		}else{
			$("#addPixellabel").html('Peak Invalidate!');
			return false;
		}
	});
</script>
<?php $this->_endblock(); ?>